# Copyright 2024 The Kumo Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

kmcmake_cc_library(
        NAMESPACE nebula
        NAME csv_test_common
        SOURCES
        test_common.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        PLINKS
        nebula::nebula_static
        ${KMCMAKE_DEPS_LINK}
)
kmcmake_cc_test(
        NAME chunker_test
        MODULE csv
        SOURCES chunker_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::csv_test_common_static
        ${KMCMAKE_DEPS_LINK}
)
kmcmake_cc_test(
        NAME column_builder_test
        MODULE csv
        SOURCES column_builder_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::csv_test_common_static
        ${KMCMAKE_DEPS_LINK}
)
kmcmake_cc_test(
        NAME column_decoder_test
        MODULE csv
        SOURCES column_decoder_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::csv_test_common_static
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME converter_test
        MODULE csv
        SOURCES converter_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::csv_test_common_static
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME parser_test
        MODULE csv
        SOURCES parser_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::csv_test_common_static
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME reader_test
        MODULE csv
        SOURCES reader_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        nebula::csv_test_common_static
        ${KMCMAKE_DEPS_LINK}
)

kmcmake_cc_test(
        NAME writer_test
        MODULE csv
        SOURCES writer_test.cc
        CXXOPTS
        ${KMCMAKE_CXX_OPTIONS}
        LINKS
        KTest::ktest
        KTest::ktest_main
        nebula::nebula_testing_static
        nebula::nebula_static
        ${KMCMAKE_DEPS_LINK}
)